package F;

public class Test {
    public void diving(Diver diver){
        diver.diver();
    }
    public void sprinting(Sprint sprint){
        sprint.sprint();
    }
    public void shooting(Shoot shoot){
        shoot.shoot();
    }

    public static void main(String[] args) {
        Test test = new Test();
        AllroundAthlete allroundAthlete =new AllroundAthlete("周",20);
        ShootAthlete shootAthlete = new ShootAthlete("张",21);
        test.diving(allroundAthlete);
        test.shooting(allroundAthlete);
        test.sprinting(allroundAthlete);
        test.shooting(shootAthlete);
    }
}
